home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / kernel / sprite / RCS / mainHook.c,v < prev    next >
Encoding:
Text File  |  1991-10-25  |  6.7 KB  |  314 lines

  1. head     5.8;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 5.8
  10. date     91.10.25.11.25.12;  author shirriff;  state Exp;
  11. branches ;
  12. next     5.7;
  13.  
  14. 5.7
  15. date     89.08.25.09.36.58;  author mendel;  state Exp;
  16. branches ;
  17. next     5.6;
  18.  
  19. 5.6
  20. date     89.08.11.11.34.05;  author brent;  state Exp;
  21. branches ;
  22. next     5.5;
  23.  
  24. 5.5
  25. date     89.01.26.11.09.12;  author brent;  state Exp;
  26. branches ;
  27. next     5.4;
  28.  
  29. 5.4
  30. date     89.01.08.11.00.08;  author brent;  state Exp;
  31. branches ;
  32. next     5.3;
  33.  
  34. 5.3
  35. date     88.08.20.10.54.33;  author ouster;  state Exp;
  36. branches ;
  37. next     5.2;
  38.  
  39. 5.2
  40. date     88.01.28.10.40.49;  author nelson;  state Exp;
  41. branches ;
  42. next     5.1;
  43.  
  44. 5.1
  45. date     87.09.24.15.33.52;  author brent;  state Exp;
  46. branches ;
  47. next     5.0;
  48.  
  49. 5.0
  50. date     87.08.11.10.53.44;  author sprite;  state Exp;
  51. branches ;
  52. next     ;
  53.  
  54.  
  55. desc
  56. @@
  57.  
  58.  
  59. 5.8
  60. log
  61. @Added main.h declaration
  62. @
  63. text
  64. @/* 
  65.  * mainHook.c --
  66.  *
  67.  *    Definitions to modify the behavior of the main routine.
  68.  *
  69.  * Copyright 1986 Regents of the University of California
  70.  * All rights reserved.
  71.  */
  72.  
  73. #ifndef lint
  74. static char rcsid[] = "$Header: /sprite/src/kernel/sprite/RCS/mainHook.c,v 5.7 89/08/25 09:36:58 mendel Exp $ SPRITE (Berkeley)";
  75. #endif not lint
  76.  
  77. #include "sprite.h"
  78. #include "main.h"
  79.  
  80. /*
  81.  * Flags to modify main's behavior.   Can be changed without recompiling
  82.  * by using adb to modify the binary.
  83.  */
  84.  
  85. Boolean main_Debug     = FALSE; /* If TRUE then enter the debugger */
  86. Boolean main_DoProf     = FALSE; /* If TRUE then start profiling */
  87. Boolean main_DoDumpInit    = TRUE; /* If TRUE then initialize dump routines */
  88. int main_NumRpcServers    = 2;     /* # of rpc servers to create */
  89. char *main_AltInit    = NULL;  /* If non-null then contains name of
  90.                   * alternate init program to use. */
  91. Boolean main_AllowNMI = FALSE;     /* TRUE -> allow non-maskable intrrupts */
  92.  
  93. #ifdef notdef
  94. /*
  95.  * Malloc/Free tracing.  This array defines which object sizes will
  96.  * be traced by malloc and free.  They'll record the caller's PC and
  97.  * the number of objects it currently has allocated.  The sizes reflect
  98.  * the 8 byte granularity of the memory allocator, plus the 16 bytes
  99.  * of overhead on each bin.
  100.  */
  101. #include "fs.h"
  102. #include "fsPdev.h"
  103. #include "fsDisk.h"
  104. #include "fsDevice.h"
  105. #include "fsFile.h"
  106. Mem_TraceInfo mainMemTraceInfo[] = {
  107.     { 24, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE)  },
  108.     { 32, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  109.     { 40, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE)  },
  110.     { 48, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE)  },
  111.     { 56, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  112.     { 64, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  113.     { 72, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  114.     { 80, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  115.     { 88, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  116.     { 96, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  117.     { 112, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  118.     { sizeof(FsFileDescriptor), (MEM_STORE_TRACE) },
  119.     { 144, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  120.     { sizeof(FsDeviceIOHandle), (MEM_STORE_TRACE) },
  121.     { sizeof(PdevControlIOHandle), (MEM_STORE_TRACE) },
  122.     { 216, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  123.     { sizeof(PdevServerIOHandle), (MEM_STORE_TRACE) },
  124.     { sizeof(FsRmtFileIOHandle), (MEM_STORE_TRACE) },
  125.     { sizeof(FsLocalFileIOHandle), (MEM_STORE_TRACE) },
  126. };
  127. #endif
  128.  
  129. /*
  130.  *----------------------------------------------------------------------
  131.  *
  132.  * Main_HookRoutine --
  133.  *
  134.  *    A routine called by main() just before the init program
  135.  *    is started.
  136.  *
  137.  * Results:
  138.  *    None.
  139.  *
  140.  * Side effects:
  141.  *    
  142.  *
  143.  *----------------------------------------------------------------------
  144.  */
  145.  
  146. void
  147. Main_HookRoutine()
  148. {
  149. #ifdef notdef
  150.     Mem_SetTraceSizes(sizeof(mainMemTraceInfo) / sizeof(Mem_TraceInfo),
  151.             mainMemTraceInfo);
  152. #endif
  153. }
  154.  
  155.  
  156. /*
  157.  *----------------------------------------------------------------------
  158.  *
  159.  * Main_InitVars --
  160.  *
  161.  *    A routine called by main() before it does anything.  Can only be used
  162.  *    to initialize variables and nothing else.
  163.  *
  164.  * Results:
  165.  *    None.
  166.  *
  167.  * Side effects:
  168.  *    
  169.  *
  170.  *----------------------------------------------------------------------
  171.  */
  172. void
  173. Main_InitVars()
  174. {
  175. }
  176.  
  177. @
  178.  
  179.  
  180. 5.7
  181. log
  182. @Removed references to bogus types.
  183. @
  184. text
  185. @d11 1
  186. a11 1
  187. static char rcsid[] = "$Header: /sprite/src/kernel/sprite/RCS/mainHook.c,v 5.6 89/08/11 11:34:05 brent Exp $ SPRITE (Berkeley)";
  188. d15 1
  189. @
  190.  
  191.  
  192. 5.6
  193. log
  194. @Updated Mem_Tracing stuff to use sizeof()
  195.  
  196. @
  197. text
  198. @d11 1
  199. a11 1
  200. static char rcsid[] = "$Header: /b/sprite/src/kernel/sprite/RCS/mainHook.c,v 5.5 89/01/26 11:09:12 brent Exp Locker: brent $ SPRITE (Berkeley)";
  201. d29 1
  202. a37 1
  203. #include "../fs/fsInt.h"
  204. d63 1
  205. a63 1
  206.  
  207. d85 1
  208. d88 1
  209. @
  210.  
  211.  
  212. 5.5
  213. log
  214. @Update memory tracing stuff
  215. @
  216. text
  217. @d11 1
  218. a11 1
  219. static char rcsid[] = "$Header: /b/sprite/src/kernel/sprite/RCS/mainHook.c,v 5.4 89/01/08 11:00:08 brent Exp $ SPRITE (Berkeley)";
  220. a14 1
  221. #include "mem.h"
  222. d30 5
  223. a34 6
  224.  * These memory tracing sizes are based on a granularity of 8 bytes
  225.  * per bucket in the memory allocator.  This granuarity stems from the
  226.  * use of a double-word for administrative info that is used so that
  227.  * allocated objects on the SPUR machine are all 8 byte aligned.
  228.  * To repeat, these are bucket sizes and reflect the implementation of
  229.  * the memory allocator.
  230. d36 6
  231. d52 10
  232. a61 2
  233.     { 136, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  234.     { 288, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  235. @
  236.  
  237.  
  238. 5.4
  239. log
  240. @Added memory tracing.
  241. @
  242. text
  243. @d11 1
  244. a11 1
  245. static char rcsid[] = "$Header: mainHook.c,v 5.3 88/08/20 10:54:33 ouster Exp $ SPRITE (Berkeley)";
  246. d30 8
  247. a38 1
  248.     { 20, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE)  },
  249. d40 10
  250. a49 5
  251.     { 28, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE)  },
  252.     { 36, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE)  },
  253.     { 44, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  254.     { 132, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  255.     { 280, (MEM_STORE_TRACE | MEM_DONT_USE_ORIG_SIZE) },
  256. @
  257.  
  258.  
  259. 5.3
  260. log
  261. @Replace main_UseAltInit with main_AltInit.
  262. @
  263. text
  264. @d11 1
  265. a11 1
  266. static char rcsid[] = "$Header: mainHook.c,v 5.2 88/01/28 10:40:49 nelson Exp $ SPRITE (Berkeley)";
  267. d15 1
  268. d30 10
  269. d61 2
  270. @
  271.  
  272.  
  273. 5.2
  274. log
  275. @Added call to variable initialization routine.
  276. @
  277. text
  278. @d11 1
  279. a11 1
  280. static char rcsid[] = "$Header: mainHook.c,v 5.1 87/09/24 15:33:52 brent Exp $ SPRITE (Berkeley)";
  281. d25 2
  282. a26 1
  283. Boolean main_UseAltInit = FALSE; /* TRUE -> try to use /initSprite.new */
  284. @
  285.  
  286.  
  287. 5.1
  288. log
  289. @*** empty log message ***
  290. @
  291. text
  292. @d11 1
  293. a11 1
  294. static char rcsid[] = "$Header: mainHook.c,v 5.0 87/08/11 10:53:44 sprite Exp $ SPRITE (Berkeley)";
  295. d50 23
  296. @
  297.  
  298.  
  299. 5.0
  300. log
  301. @First Sprite native copy
  302. @
  303. text
  304. @d11 1
  305. a11 1
  306. static char rcsid[] = "$Header: mainHook.c,v 1.1 86/12/04 23:53:10 andrew Exp $ SPRITE (Berkeley)";
  307. d24 1
  308. a24 1
  309. int main_NumRpcServers    = 4;     /* # of rpc servers to create */
  310. d26 1
  311. a26 1
  312.  
  313. @
  314.